<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>在校生管理系统 -- 登录</title>
</head>
<body>
  <form action="/login" method="post">
    <table align="center">
      <caption><a href="http://www.wolfcode.cn"><b>叩丁狼</b>在校学生管理系统</a></caption>
      <th style="color: red">${logMsg}</th>
      <tr>
        <td>账户</td>
        <td>
          <input type="text" placeholder="请输入账号"  value="${cookie.username.value}"  name="username">
        </td>
      </tr>
      <tr>
        <td>密码</td>
        <td>
          <input type="password" placeholder="请输入密码" name="password">
        </td>
      </tr>
      <tr>
        <script>
          function changImg() {
            document.getElementById("randomCode").src="/randomCode?"+Math.random();
          }
        </script>
        <td><input type="text" placeholder="请输入验证码" name="randomCode"></td>
        <td><img alt="验证码" src="/randomCode" id="randomCode" onclick="changImg()"></td>
      </tr>
      <tr>
        <td><input type="checkbox" name="rememberMe"  ${cookie.username!=null?'checked':''} ></td>
        <td>记住我</td>
      </tr>
      <tr>
        <td colspan="2"><input type="submit" value="登录"></td>
      </tr>
    </table>
  </form>
</body>
</html>
